#include "main.h"
#include "stm32f0xx.h"
#include "led.h"
#include "systick.h"
//#include "time.h"
//#include "uart.h"
//#include "buttion.h"

__IO uint16_t temp1;
uint8_t usart_tmp;

 void delay (int cnt) 
{
  while (cnt--);
}

int main(void)
{
	//TIM3_Init();
	//TIM3_Config();
	LED_Init();
	LED_Open();
	//Systick_Init();
	//USART_Configuration();
	//EXIT_KEY_Init();
	
	
  while (1)
  {
		/*if((TIM3->SR)&TIM_IT_Update)
		{
			LED_Toggle();
		  //delay(2000000);
			TIM_ClearITPendingBit(TIM3, TIM_IT_Update);

			//LED_Close();
		}*/
		//UART_send_byte(0x64);
	  Delay_ms(5000000);
		LED_Toggle();
		//if(temp1==1000)
		//{
			//temp1=0;
			//LED_Toggle();
		//}
		//LED_Open();
		//Delay_ms(1000); 
		//LED_Close();
		//Delay_ms(1000); 
  }
}

/*void TIM3_IRQHandler(void)
{
	TIM_ClearITPendingBit(TIM3, TIM_IT_Update);
	temp1++;
}*/
/*void USART1_IRQHandler(void)
{
  if(USART_GetITStatus(USART1, USART_IT_RXNE) != RESET)
  {
   usart_tmp = USART_ReceiveData(USART1);
	 UART_send_byte(usart_tmp);
  }
}

void EXTI4_15_IRQHandler(void)
{
  if(EXTI_GetITStatus(EXTI_Line11) != RESET)
  {
		UART_send_byte(0x64);
    EXTI_ClearITPendingBit(EXTI_Line11);
  }
}*/

#ifdef  USE_FULL_ASSERT
void assert_failed(uint8_t* file, uint32_t line)
{ 
  while (1)
  {
  }
}
#endif

